
from rest_framework import viewsets

from .models import PurchaseLog
from .serializers import PurchaseLogSerializer


class PurchaseLogViewSet(viewsets.ModelViewSet):
    '''
    list: 查询所有PurchaseLog
    create: 新增PurchaseLog
    retrieve: 查询单个PurchaseLog, 文档名: read,接口名: retrieve
    update: 更新PurchaseLog
    destroy: 删除PurchaseLog
    '''
    queryset = PurchaseLog.objects.all()
    serializer_class = PurchaseLogSerializer

